#include "safeset.h"
#include "ui_safeset.h"
#include "mainWidget.h"

SafeSet::SafeSet(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SafeSet)
{
    ui->setupUi(this);

    pWidget = static_cast<Widget*>(parent);

    ui->stackedWidget->setCurrentIndex(LimPosSet_id);

    //返回设置子界面
    connect(ui->Btn_back, &QPushButton::clicked, this, [=](){
        pWidget->backSetPage();
    });

    connect(ui->Btn_limPosSet, &QPushButton::clicked, this, [=](){
        ui->stackedWidget->setCurrentIndex(LimPosSet_id);
    });
    connect(ui->Btn_safeAreaSet, &QPushButton::clicked, this, [=](){
        ui->stackedWidget->setCurrentIndex(SafeAreaSet_id);
    });
}

SafeSet::~SafeSet()
{
    delete ui;
}
